Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Apr 28, 2025

@llvm/pr-subscribers-tablegen

@llvm/pr-subscribers-backend-directx

Author: Kazu Hirata (kazutakahirata)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/137584.diff

1 Files Affected:

  • (modified) llvm/utils/TableGen/DXILEmitter.cpp (+1-2)
diff --git a/llvm/utils/TableGen/DXILEmitter.cpp b/llvm/utils/TableGen/DXILEmitter.cpp
index 0364b02c2483d..09ce9f3027410 100644
--- a/llvm/utils/TableGen/DXILEmitter.cpp
+++ b/llvm/utils/TableGen/DXILEmitter.cpp
@@ -172,10 +172,9 @@ DXILOperationDesc::DXILOperationDesc(const Record *R) {
   // Get the operation class
   OpClass = R->getValueAsDef("OpClass")->getName();
 
-  if (!OpClass.str().compare("UnknownOpClass")) {
+  if (OpClass.str() == "UnknownOpClass")
     PrintFatalError(R, Twine("Unspecified DXIL OpClass for DXIL operation - ") +
                            OpName);
-  }
 
   auto IntrinsicSelectRecords = R->getValueAsListOfDefs("intrinsics");
   if (IntrinsicSelectRecords.size()) {

@kazutakahirata kazutakahirata merged commit 044ff78 into llvm:main Apr 28, 2025
14 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_001_clang_tidy_readability_string_compare_llvm_TableGen branch April 28, 2025 16:34
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants